<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
  <meta charset="UTF-8">
  <title>JavaScript 比较</title>
</head>
<body>
<h2>&& 与</h2>

<p>如果两个表达式都为 true，则 AND 运算符（&&）返回 true，否则返回 false。</p>

<p id="demo"></p>

<script>
  var x = 6;
  var y = 3;

document.getElementById("demo").innerHTML =
        (x < 10 && y > 1) + "<br>" +
        (x < 10 && y < 1);
</script>

</body>
</html>

<!--
运行结果：
true
false
-->